<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>动画</title>
    <style>
      .parent {
        width: 600px;
        height: 600px;
        background-color: cyan;
      }
      .child {
        height: 100px;
        width: 100px;
        background-color: chocolate;
        animation: move 5s linear 0s infinite;
      }
      @keyframes move {
        0% {
          transform: translate(0px, 0px);
        }
        25% {
          transform: translate(500px, 0px);
        }
        50% {
          transform: translate(500px, 500px);
        }
        75% {
          transform: translate(0px, 500px);
        }
        100% {
          transform: translate(0px, 0px);
        }
      }
    </style>
  </head>
  <body>
    <div class="parent">
      <div class="child"></div>
    </div>
  </body>
</html>
